#ifndef SELECTFRIENDAREA_H
#define SELECTFRIENDAREA_H

#include <QDialog>
#include <QHBoxLayout>
#include <QLabel>
#include"selectfriendscrollarea.h"
class SelectFriendArea : public QDialog
{
    Q_OBJECT
public:
    SelectFriendArea(QWidget*parent=nullptr);
    void InitLeft();
    void  InitRight();
    void addItem(const QString&userid,const QIcon&avator,const QString &text,bool checked);
    void addSelectedItem(const QString&userid,const QIcon&avator,const QString &text,bool checed);
    void deleteSelectedItem(const QString&userid);
    SelectFriendScrollArea* getLeftScroll();
    SelectFriendScrollArea*getRightScroll();
private:
    //总的布局管理器
    QHBoxLayout*layout;
    //左侧的相关控件
    QWidget* leftContainer ;
    QVBoxLayout* leftMainLayout;
    QLabel* leftTitle;
    SelectFriendScrollArea*leftScrollArea;
    //右侧的相关控件
    QVBoxLayout*rightMainLayout;
    QWidget* rightContainer;
    QWidget* titleWidget;
    QLabel* countLabel;
    SelectFriendScrollArea*rightScrollArea;
    QHBoxLayout *rightBtnLayout;
    QLabel *rightFlag;
    QPushButton *rightCancelBtn;
    QPushButton*rightFinishBtn;
    int count=0;
};

#endif // SELECTFRIENDAREA_H
